<?php 
$regions = $mvc->getObject(RegionService::REGIONS);
$countries = $mvc->getObject(CountryService::COUNTRY);
?>
<div class="wrapLogin">
	<div class="greyBox">
		<div class="viewBox viewBoxL">
			<div class="cT"><em class="cL"></em><em class="cR"></em></div>
			<div class="cL">
				<div class="cR">
					<div class="bodyBox">
						<h2>_i18n{Personal Data}</h2>
						<?php $message = $mvc->getObject(UsersService::ON_SUCCESS);
							if (isset($message) && $message!=NULL){?>
							<div class="unitABlock unitABlockLast">
								<div class="itemOk"><?php echo $message; ?></div>
							</div>
							<?php } else { ?>
							<form action="confirm-registration.html" method="post" name="registration">
							<div class="unitABlock">
							<?php $errors = $mvc->getObject(UsersService::ERROR);
								if (isset($errors) && $errors == true){?>
								<div class="itemWarning">
									<ul>
										<li>_i18n{Please, fill in all required fields (*).}</li>
									</ul>
								</div>
								<?php } ?>
								<input type="hidden" name="id" value="<? if(isset($_GET['id'])) echo $_GET['id']; if(isset($_POST['id'])) echo $_POST['id'];?>"/>
								<input type="hidden" name="validation_id" value="<? if(isset($_GET['validation_id'])) echo $_GET['validation_id']; if(isset($_POST['validation_id'])) echo $_POST['validation_id'];?>"/>
								<div class="unitEqColumn">
									<div class="itemForm">
										<label>_i18n{Address}:<span class="itemReq">*</span></label>
										<span class="itemData">
											<input type="text" class="inpTxt" name="address" value="<? if(isset($_POST['address'])) echo $_POST['address']; ?>"/>
										</span>
									</div>
									<div class="itemForm">
										<label>_i18n{Zip code}:<span class="itemReq">*</span></label>
										<span class="itemData">
											<input type="text" class="inpTxt" name="zip" value="<? if(isset($_POST['zip'])) echo $_POST['zip']; ?>"/>
										</span>
									</div>
									<div class="itemForm">
										<label>_i18n{Location}:<span class="itemReq">*</span></label>
										<span class="itemData">
											<input type="text" class="inpTxt" name="location" value="<? if(isset($_POST['location'])) echo $_POST['location']; ?>"/>
										</span>
									</div>
									<div class="itemForm">
										<label>_i18n{Country}:</label>
										<div class="itemData">
											<select name="country" >
							<?php			if (isset($countries) && $countries!=NULL){ 
											foreach($countries as $key=>$country){ ?>						
													<option value="<?php echo $country[CountryService::ID] ?>"><?php echo $country[CountryService::COUNTRY_NAME] ?></option>
							<?php 				} 
										} ?>
											</select>
										</div>
									</div>		
									<div class="itemForm">
										<label>_i18n{State}:</label>
										<div class="itemData">
											<select name="region" >
							<?php			if (isset($regions) && $regions!=NULL){ 
											foreach($regions as $key=>$region){ ?>
													<option value="<?php echo $region[RegionService::ID] ?>"><?php echo $region[RegionService::REGION_NAME] ?></option>
							<?php 				} 
										} ?>
											</select>
										</div>
									</div>
									<div class="itemForm">
										<label>_i18n{Mobile phone}:<span class="itemReq">*</span></label>
										<span class="itemData">
											<input type="text" class="inpTxt" name="phone" value="<? if(isset($_POST['phone'])) echo $_POST['phone']; ?>"/>
										</span>
									</div>
									<div class="itemForm">
										<label>_i18n{Homepage}:<span class="itemReq">*</span></label>
										<span class="itemData">
											<input type="text" class="inpTxt" name="homepage" value="<? if(isset($_POST['homepage'])) echo $_POST['homepage']; ?>"/>
										</span>
									</div>
									<div class="itemForm">
										<span class="itemData">
											<input type="checkbox" class="inpChk" name="newsletter" value="1" checked="checked"/>
											<label>_i18n{Send me newsletter.}</label>
										</span>
									</div>
								</div>
							</div>
							<h2>_i18n{Bank Info}</h2>
							<div class="unitABlock unitABlockLast">
								<div class="unitEqColumn">
									<div class="itemForm">
										<label>_i18n{Bank}:<span class="itemReq">*</span></label>
										<span class="itemData">
											<input type="text" class="inpTxt" name="bank" value="<? if(isset($_POST['bank'])) echo $_POST['bank']; ?>"/>
										</span>
									</div>
									<div class="itemForm">
										<label>_i18n{Bank code}:<span class="itemReq">*</span></label>
										<span class="itemData">
											<input type="text" class="inpTxt" name="bank_code" value="<? if(isset($_POST['bank_code'])) echo $_POST['bank_code']; ?>"/>
										</span>
									</div>
									<div class="itemForm">
										<label>_i18n{Account number}:<span class="itemReq">*</span></label>
										<span class="itemData">
											<input type="text" class="wide inpTxt" name="account_number" value="<? if(isset($_POST['account_number'])) echo $_POST['account_number']; ?>"/>
										</span>
									</div>
								</div>
								<div class="unitBtn">
									<button type="submit" name="submit"><span><strong>_i18n{Sign Up}</strong></span></button>
									<a class="linkBtn" href="/"><span><strong>_i18n{Cancel}</strong></span></a>
								</div>
							</div>
						</form>
						<?php } ?>
					</div>
				</div>
			</div>
			<div class="cB"><em class="cL"></em><em class="cR"></em></div>
		</div>
		<!-- fix gradient on -->
		<div class="lineHide"></div>
		<!-- fix gradient off -->
	</div>
</div>